<?php

namespace app\common\controller;

use think\Controller;

class Base extends Controller
{
    protected function initialize(){
        parent::initialize();
        //后台IP白名单检测
        if(get_s_c('ht_ip_whitelist')){
            $white_IP = explode('/', get_s_c('ht_ip_whitelist'));
            if(!in_array(request()->ip(), $white_IP)){
                header('HTTP/1.1 404 Not Found');
                header("status: 404 Not Found");
                exit;
            }
        }
    }
}